namespace Beaker.Injection
{
	public sealed class Factory<T>
		: IFactory<T>
		where T : class
	{
		private readonly IQueryContainer _queryContainer;

		public Factory(IQueryContainer queryContainer)
		{
			_queryContainer = queryContainer;
		}

		public T Create()
		{
			return _queryContainer.GetInstance<T>();
		}
	}
}